import VueRouter from 'vue-router'

import Login from "@/view/Login";
import Register from "@/view/Register";
import ChatHome from '../view/pages/chatHome/index.vue'
import Video from '../view/pages/video.vue'
import Lingting from '../view/pages/lingting.vue'
import Setting from '../view/pages/setting.vue'
import ChatWindow from '../view/pages/chatHome/chatwindow.vue'
 
export default new VueRouter({
    routes: [
        {path:'/', redirect:"/head"},
        {
            path: '/head',
            component: ()=>import("@/head/HeadView"),
            redirect: '/head/home',
            children:[
                {
                    path: '/head/home',
                    component: ()=>import("@/view/HomeView")
                },
                {
                    path: '/head/video',
                    component: ()=>import("@/view/Video")
                },
                {
                    path: '/head/strategy',
                    component: ()=>import("@/view/Strategy")
                },
                {
                    path: '/head/friend',
                    component: ()=>import("@/view/Friend")
                },
                {
                    path: '/head/center',
                    component: ()=>import("@/view/center"),
                    redirect: '/head/center/create',
                    children:[
                        {
                            path: '/head/center/create',
                            component: ()=>import("@/view/center/create")
                        }
                    ]
                },
                {
                    path: "/ChatHome",
                    name: "ChatHome",
                    component: ChatHome,
                },
            ]
        },
        {
            path: '/login',
            component: Login
        },
        {
            path: '/register',
            component: Register
        },


        // {
        //     path: "/ChatHome",
        //     name: "ChatHome",
        //     component: ChatHome,
        // },
        {
            path: "/Video",
            name: "Video",
            component: Video
        },
        {
            path: "/Lingting",
            name: "Lingting",
            component: Lingting
        },
        {
            path: "/Setting",
            name: "Setting",
            component: Setting
        },
    ]
})